package com.digitalchina.lxnsy.sy.siwei;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;


public class FeedingRecordsActivity extends BaseHtmlActivity {
    private int tag = 0;

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);

        loadUrl("feedingRecords");
        setTitle("饲喂记录");

        setRightText("新增");

    }


    @Override
    public void onResume() {
        super.onResume();
        if (tag > 0) {
            callJsMethod("refresh");
        }
        tag++;

    }




    @Override
    public void rightOnClick() {
        go(NewFeedingRecordActivity.class);
    }

    public class JsApi {


        @JavascriptInterface
        public void feedingRecordDetails(Object msg) {
            go(FeedingRecordDetailsActivity.class);

        }









    }
}
